package com.automation.fitness.core.userinfo;

import lombok.Getter;

@Getter
public class UserProfile {
    // 性别
    private final Gender gender;

    // 年龄
    private final int age;

    // 身高 cm
    private final double heightCm;

    // 体重 kg
    private final double weightKg;

    // BMI
    private final BMI bmi;

    // BMR
    private final BMR bmr;

    public UserProfile(int age, double weightKg, double heightCm, Gender gender) {
        this.age = age;
        this.weightKg = weightKg;
        this.heightCm = heightCm;
        this.gender = gender;
        this.bmi = BMI.calculate(heightCm, weightKg);
        this.bmr = BMR.calculate(gender, age, heightCm, weightKg);
    }
}
